import java.util.ArrayList;
import java.awt.Color;

public class DataOfSquare {

	
	//ArrayList that'll contain the colors
	private ArrayList<Color> C =new ArrayList<>();
	private int color; //3: snake head, 2: snake body , 1: food, 0:empty
	SquarePanel square;  // extends JPanel
	public DataOfSquare(int col){

		//Lets add the color to the arrayList
		C.add(Color.darkGray);//0  蛇身
		C.add(Color.BLUE);    //1  食物
		C.add(Color.white);   //2  背景
		C.add(Color.RED);  // 3 ->蛇头
		color=col;
		square = new SquarePanel(C.get(color));
	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
	}

	public void lightMeUp(int c){
		square.ChangeColor(C.get(c));
	}
}
